<!DOCTYPE html>
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <title>The source code</title>
  <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
  <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
  <style type="text/css">
    .highlight { display: block; background-color: #ddd; }
  </style>
  <script type="text/javascript">
    function highlight() {
      document.getElementById(location.hash.replace(/#/, "")).className = "highlight";
    }
  </script>
</head>
<body onload="prettyPrint(); highlight();">
  <pre class="prettyprint lang-js"><span id='global-property-'>/**
</span> * @ignore
 * undo button
 * @author yiminghe@gmail.com
 */
KISSY.add(&quot;editor/plugin/undo&quot;, function (S, Editor, Btn, cmd) {
    function undo() {
    }

    S.augment(undo, {
        pluginRenderUI: function (editor) {
            // 先 button 绑定事件
            editor.addButton(&quot;undo&quot;, {
                mode: Editor.Mode.WYSIWYG_MODE,
                tooltip: &quot;撤销&quot;,
                editor: editor
            }, Btn.UndoBtn);

            editor.addButton(&quot;redo&quot;, {
                mode: Editor.Mode.WYSIWYG_MODE,
                tooltip: &quot;重做&quot;,
                editor: editor
            }, Btn.RedoBtn);
            cmd.init(editor);
        }
    });

    return undo;
}, {
    requires: ['editor', './undo/btn', './undo/cmd']
});</pre>
</body>
</html>
